import React, {Component} from 'react'
import Item from './Item'
import './index.css'

export default class List extends Component {
  render() {
    const {todos, changeTodoStatus, deleteTodo} = this.props
    return (
      <ul className="todo-main">
        {
          todos.map(item => {
            return <Item todo={item} key={item.id} deleteTodo={deleteTodo} changeTodoStatus={changeTodoStatus}/>
          })
        }
      </ul>
    )
  }
}
